from typing import List, Optional
from pydantic import BaseModel

class MirrorTestResult(BaseModel):
    """
    镜像加速器测试结果模型
    """
    mirror_url: str
    is_valid: bool
    response_time: Optional[float]
    error_message: Optional[str] = None

class TestResults(BaseModel):
    """
    测试结果集合模型
    """
    timestamp: float
    results: List[MirrorTestResult]